function Clipboard_Throne() {

var kingdom                = 0;
var island                 = 0;
var Rank                   = 0;
var Gender                 = 0;
var Race                   = 0;
var Personality            = 0;
var Land                   = 0;
var Money                  = 0;
var Food                   = 0;
var Runes                  = 0;
var Peasants               = 0;
var Building_Effectiveness = 0;
var Trade_Balance          = 0;
var Networth               = 0;
var Soldiers               = 0;
var War_Horses             = 0;
var Prisoners              = 0;
var Offensive_Points       = 0;
var Defensive_Points       = 0;
var Offensive_Units        = 0;
var Defensive_Units        = 0;
var Elite_Units            = 0;
var Thieves                = 0;
var Wizards                = 0;
var Stealth                = 0;
var Mana                   = 0;
var Tax_Percentage         = 0;
var Daily_Income           = 0;
var MEO                    = 0;
var MED                    = 0;
var SCI                    = 0;
var npa                    = 0;
var OverPop                = 0;
var Plague                 = 0;
var War                    = 0;
var Dragon                 = 0;
var Hit                    = 0;
var Crystal_Ball           = 0;
var Ruler_Name             = "";
var Unbuilt                = "";
var Additional_Name        = "";
var Networth_Name          = "";

var TPAMod       = "";
var WPAMod       = "";

var Utopia_Year   = 0;
var Utopia_Month  = 0;
var Utopia_Day    = 0;
var Utopia_Hour   = 0;
var Utopia_Minute = 0;
var Real_Date     = "";
var Utopian_Date  = "";
var temp          = "";

if ( EL == 1 ) { Export_Line = Export_Line_Decryption(mytext);

Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1);

Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Province_Name          = ABC_Decryption( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); kingdom                = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); island                 = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Utopia_Year            = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Utopia_Month           = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Utopia_Day             = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Utopia_Minute          = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Race                   = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Gender                 = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Rank                   = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Personality            = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Land                   = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Peasants               = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Building_Effectiveness = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Offensive_Points       = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Defensive_Points       = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Money                  = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Food                   = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Runes                  = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Soldiers               = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Offensive_Units        = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Defensive_Units        = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Elite_Units            = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Thieves                = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Stealth                = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Wizards                = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Mana                   = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Trade_Balance          = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); War_Horses             = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Prisoners              = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Networth               = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Dragon                 = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Hit                    = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Plague                 = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); War                    = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); OverPop                = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Crystal_Ball           = Number( Export_Line.slice(0,Export_Line.indexOf("_")) );
Export_Line = Export_Line.slice(Export_Line.indexOf("_")+1); Ruler_Name             = ABC_Decryption( Export_Line.slice(0) );

} else {


mytext = mytext.slice(mytext.indexOf("Worth/Acre"));
mytext = mytext.slice(mytext.indexOf(eol)+1);

if ( mytext.indexOf("Message from Our Monarch") != -1 ) {

mytext = mytext.slice(mytext.indexOf("Message from Our Monarch"));
mytext = mytext.slice(mytext.indexOf(eol)+1); 
mytext = mytext.slice(mytext.indexOf(eol)+1); 

}

if ( mytext.indexOf("Early indications show that our operation was a success") != -1 ) Crystal_Ball = 1;

for (i=1; i<5 ; i++) if ( mytext.indexOf( Hit_Search_Key[i]    ) != -1 ) Hit     = i;

mytext = mytext.slice(mytext.indexOf("The Province of"));

temp = mytext.slice(mytext.indexOf("The Province of")+16,mytext.indexOf(")")+1);
Province_Name = temp.slice(0,temp.indexOf("(")-1);
kingdom       = temp.slice(temp.indexOf("(")+1,temp.indexOf(":"));
island        = temp.slice(temp.indexOf(":")+1,temp.indexOf(")"));

mytext = mytext.slice(mytext.indexOf(eol)+1);

temp = mytext.slice(0,mytext.indexOf(" (")); Utopian_Date = temp;

Utopia_Month = temp.slice(0,temp.indexOf(" ")); for (i=0; i<7 ; i++) { if ( Utopia_Month == Months[i] ) Utopia_Month = i+1; }

temp = temp.slice(temp.indexOf(" ")+1);

Utopia_Day  = Number(temp.slice(0,temp.indexOf(" ")));
Utopia_Year = Number(temp.slice(temp.indexOf(" YR")+3));
Utopia_Minute = 0;

if ( mytext.indexOf("next tick:") != -1 ) {

temp = mytext.slice(mytext.indexOf("next tick:"));
temp = temp.slice(temp.indexOf(" ")+1);
temp = temp.slice(temp.indexOf(" ")+1);

if ( temp.indexOf("minute") != -1 ) Utopia_Minute = Math.round( 60 - Number(temp.slice(0,temp.indexOf(" ")))    );
if ( temp.indexOf("second") != -1 ) Utopia_Minute = Math.round( 60 - Number(temp.slice(0,temp.indexOf(" ")))/60 );

if ( mytext.indexOf("Pre Age") != -1 ) {
Utopia_Year   = 0;
Utopia_Month  = 1;
Utopia_Day    = 1;
Utopia_Hour   = 0;
Utopia_Minute = 0;
}

}

temp = mytext.slice(mytext.indexOf("Race")+5); temp = temp.slice(0,temp.indexOf("Soldiers")-1);
for (i=0; i<Race_Name.length; i++) if ( Race_Name[i] == temp ) Race = i;

Soldiers = CB_Find( mytext, "Soldiers"      , eol );

temp = mytext.slice(mytext.indexOf("Ruler")+6); temp = temp.slice(0,temp.indexOf(eol));

Offensive_Units = Number( temp.slice(temp.lastIndexOf(" ")+1) );

Ruler_Name = temp.slice( 0 , temp.lastIndexOf(Offensive_Specialist_Name[Race]) - 1 );

for (i=0; i<Personality_Search_Key.length; i++) if ( Ruler_Name.indexOf( Personality_Search_Key[i] ) != -1 ) Personality = i;
for (t=0; t<2 ; t++) for (i=1; i<Rank_Search_Key[t].length; i++) if ( Ruler_Name.indexOf( Rank_Search_Key[t][i] ) != -1 ) { Gender = t; Rank = i; }

mytext = mytext.slice(mytext.indexOf("Ruler"));
mytext = mytext.slice(mytext.indexOf(eol)+1);

Building_Effectiveness = CB_Find( mytext, "Building Eff." , "%" );
Money                  = CB_Find( mytext, "Money"         , " " );
Trade_Balance          = CB_Find( mytext, "Trade Balance" , " " );
Land                   = CB_Find( mytext, "Land"          , " " );
Food                   = CB_Find( mytext, "Food"          , " " );
Runes                  = CB_Find( mytext, "Runes"         , " " );
Peasants               = CB_Find( mytext, "Peasants"      , " " );
//Soldiers               = CB_Find( mytext, "Soldiers"      , eol );
War_Horses             = CB_Find( mytext, "War Horses"    , eol );
Prisoners              = CB_Find( mytext, "Prisoners"     , eol );
Offensive_Points       = CB_Find( mytext, "Off. Points"   , eol );
Defensive_Points       = CB_Find( mytext, "Def. Points"   , eol );

//Offensive_Units        = CB_Find( mytext, Offensive_Specialist_Name[Race] , eol );

Networth = CB_Find( mytext, "Networth"   , " " );

temp = mytext.slice(mytext.indexOf("Land "));
temp = temp.slice(temp.indexOf(" ")+1);
temp = temp.slice(temp.indexOf(" ")+1);
temp = temp.slice(temp.indexOf(" ")+1);
temp = temp.slice(0,temp.indexOf(eol));

Defensive_Units = Number( temp );

//Defensive_Units        = CB_Find( mytext, Defensive_Specialist_Name[Race] , eol );
Elite_Units            = CB_Find( mytext, Elite_Unit_Name[Race]           , eol );

if ( mytext.indexOf( Plague_Search_Key    ) != -1 ) Plague  = 1;
if ( mytext.indexOf( War_Search_Key       ) != -1 ) War     = 1;
if ( mytext.indexOf( OverPop_Search_Key   ) != -1 ) OverPop = 1;

for (i=1; i<5 ; i++) if ( mytext.indexOf( Dragon_Search_Key[i] ) != -1 ) Dragon  = i;

if ( Crystal_Ball == 0 ) {

Thieves = CB_Find( mytext, "Thieves" , " " );
Wizards = CB_Find( mytext, "Wizards" , " " );
Stealth = CB_Find( mytext, "Thieves " + Thieves + " " , "%" );
Mana    = CB_Find( mytext, "Wizards " + Wizards + " " , "%" );

}

}

Export_Line = "_992_"+ABC_Encryption(Province_Name)+"_"+kingdom+"_"+island+"_"+Utopia_Year+"_"+Utopia_Month+"_"+Utopia_Day+"_"+Utopia_Minute+"_"+Race+"_"+Gender+"_"+Rank+"_"+
Personality+"_"+Land+"_"+Peasants+"_"+Building_Effectiveness+"_"+Offensive_Points+"_"+Defensive_Points+"_"+
Money+"_"+Food+"_"+Runes+"_"+Soldiers+"_"+Offensive_Units+"_"+Defensive_Units+"_"+Elite_Units+"_"+Thieves+"_"+Stealth+"_"+
Wizards+"_"+Mana+"_"+Trade_Balance+"_"+War_Horses+"_"+Prisoners+"_"+Networth+"_"+Dragon+"_"+Hit+"_"+Plague+"_"+War+"_"+OverPop+"_"+Crystal_Ball+"_"+ABC_Encryption(Ruler_Name);

temp = "th";

if ( Utopia_Day ==  1 ) temp = "st";
if ( Utopia_Day ==  2 ) temp = "nd";
if ( Utopia_Day ==  3 ) temp = "rd";
if ( Utopia_Day == 21 ) temp = "st";
if ( Utopia_Day == 22 ) temp = "nd";
if ( Utopia_Day == 23 ) temp = "rd";
if ( Utopia_Day == 31 ) temp = "st";

Utopian_Date = Months[Utopia_Month-1] + " " + Utopia_Day + temp + ", YR" + Utopia_Year ;

Utopia_Hour = Utopia_Day - 1;

Real_Date = RealTime(Utopia_Year,Utopia_Month,Utopia_Day,Utopia_Minute);

var Population = Peasants + Soldiers + Offensive_Units + Defensive_Units + Elite_Units + Thieves + Wizards ;
var Draft_Rate = Math.round( ( Soldiers + Offensive_Units + Defensive_Units + Elite_Units + Thieves ) / Population * 10000 )/100 ;

temp = Offensive_Units * Offensive_Specialist_Strength[Race] + Elite_Units * Offensive_Elite_Unit_Strength[Race] + Soldiers * Offensive_Soldiers_Strength[Race] + War_Horses ;

































///////////////////////////////////////////////////////
// Spell :: Aggression :: Faeries = 8 , Halfling = 9 //
///////////////////////////////////////////////////////

if (( Race == 8 )||( Race == 9 )) temp += Soldiers ; // Aggression for Halfling : Soldiers: 2/2 -> 2/0 (3/1)

if ( temp > 0 ) MEO = Offensive_Points / temp * 100 ;
if ( temp == 0 ) MEO = 100;

temp = Defensive_Units * Defensive_Specialist_Strength[Race] + Elite_Units * Defensive_Elite_Unit_Strength[Race] + Soldiers * Defensive_Soldiers_Strength[Race] ;

var MEStanceSTR = "Military Eff. with Stance: ";

/////////////////////////////////////////////////////
// Spell :: Town Watch :: Undead = 6 , Faeries = 8 //
/////////////////////////////////////////////////////

///////////////////////////////////////////////////////
// Spell :: Aggression :: Faeries = 8 , Halfling = 9 //
///////////////////////////////////////////////////////

///////////////////////////////////////////////////////
// Ultima assumes the safest case for you by default //
// Meaning Town Watch is on and Aggression is off    //
///////////////////////////////////////////////////////

if (( Race == 6 )||( Race == 8 )||( Race == 9 )) {

MEStanceSTR = "ME+Stance ("+cc+c3+"spells*"+cc+c1+"): ";

temp += Math.round( Peasants / 4 ) ; // Spell :: Town Watch

if (( Race == 8 )||( Race == 9 )) temp -= Soldiers ; // Spell :: Aggression

}

if ( temp > 0 ) MED = Defensive_Points / temp * 100;
if ( temp == 0 ) MED = 100;

var horm = War_Horses ; if ( horm > Soldiers + Offensive_Units + Elite_Units * 1.00 ) horm = Math.round( Soldiers + Offensive_Units + Elite_Units * 1.00 ) ;

var el75 = Math.round( ( Offensive_Units * Offensive_Specialist_Strength[Race] + Elite_Units * 1.00 * Offensive_Elite_Unit_Strength[Race] + Soldiers + horm ) * MEO / 100 ) ;
var el25 = Math.round( ( Defensive_Units * Defensive_Specialist_Strength[Race] + Elite_Units * 0    * Defensive_Elite_Unit_Strength[Race] + Soldiers        ) * MED / 100 ) ;

var horm = War_Horses ; if ( horm > Soldiers + Offensive_Units + Elite_Units ) horm = Soldiers + Offensive_Units + Elite_Units ;
horm = Math.round( horm * MEO /100 ) ;


var OPA = Math.round( Offensive_Points / Land * 100 )/100 ;
var DPA = Math.round( Defensive_Points / Land * 100 )/100 ;
var TPA = Math.round( Thieves          / Land * 100 )/100 ;
var WPA = Math.round( Wizards          / Land * 100 )/100 ;
var PPA = Math.round( Population       / Land * 100 )/100 ;
var pa75 = Math.round( el75            / Land * 100 )/100 ;
var pa25 = Math.round( el25            / Land * 100 )/100 ;

var offm = Math.round( Offensive_Units * Offensive_Specialist_Strength[Race] * MEO /100 ) ;
var defm = Math.round( Defensive_Units * Defensive_Specialist_Strength[Race] * MED /100 ) ;
var oelm = Math.round( Elite_Units     * Offensive_Elite_Unit_Strength[Race] * MEO /100 ) ;
var delm = Math.round( Elite_Units     * Defensive_Elite_Unit_Strength[Race] * MED /100 ) ;
var prim = Math.round( Prisoners       * 3                                   * MEO /100 ) ;

temp = 0;

if ( Rank == 0 ) temp = 0;
if ( Rank == 1 ) temp = 0;
if ( Rank == 2 ) temp = 2;
if ( Rank == 3 ) temp = 4;
if ( Rank == 4 ) temp = 6;
if ( Rank == 5 ) temp = 10;
if ( Rank == 6 ) temp = 14;
if ( Rank == 7 ) temp = 18;
if ( Rank == 8 ) temp = 22;

if ( Personality == 2 ) temp = temp * 2; // The War Hero +100% Honor Effects

Daily_Income = ( 2.75 * Peasants + 0.5 * Prisoners ) * ( 1 + temp / 100 ) ;

if ( ( Personality != 7 ) && ( Plague == 1 ) ) Daily_Income = Daily_Income * 0.85 ; // Cleric Immune to The Plague
if ( ( Personality != 2 ) && ( Dragon != 0 ) ) Daily_Income = Daily_Income * 0.9  ; // War Hero Immune to dragon effects

Daily_Income = Math.round( Daily_Income ) ;











/////////////////
// Honor Bonus //
/////////////////

var Honor_Bonus = 1;

     if ( Rank == 3 ) Honor_Bonus = 1.03;
else if ( Rank == 4 ) Honor_Bonus = 1.06;
else if ( Rank == 5 ) Honor_Bonus = 1.09;
else if ( Rank == 6 ) Honor_Bonus = 1.15;
else if ( Rank == 7 ) Honor_Bonus = 1.21;
else if ( Rank == 8 ) Honor_Bonus = 1.27;
//else if ( Rank == 9 ) Honor_Bonus = 1.33; // Monarch Bonus Removed

if ( Personality == 2 ) Honor_Bonus = Honor_Bonus * 2; // The War Hero +100% Honor Effects

/////////////////
// Honor Bonus //
/////////////////









/////////////
// TPA Mod //
/////////////

var Building_TD = prefService.getIntPref( "extensions.Ultima.Building_Available_TD" );
var Building_Thieves_Dens_Bonus = 1;
if ( Personality == 4 ) Building_Thieves_Dens_Bonus = Building_Thieves_Dens_Bonus * 2 ; // All Thieves Dens are twice as effective (subject to DBE)
var Thievery_Bonus_TD = ( Building_Modifier_Thievery_Effectiveness * ( Building_TD / Land ) * Building_Thieves_Dens_Bonus * Building_Effectiveness * (1 - ( Building_TD / Land ) * Building_Thieves_Dens_Bonus ) ) / 100 + 1 ;

var Sci_Available_Crime = prefService.getIntPref( "extensions.Ultima.ScienceCalculatorAvailableCrime" );
var Sci_Race_Bonus = 1;
var Sci_Personality_Bonus = 1;







if ( Race == 3 ) Sci_Race_Bonus = 0.8; // Orc

if ( Personality ==  6 ) Sci_Personality_Bonus = 1.33; // Sage

if ( Personality == 1 ) Sci_Mult_Channeling = 6*1.5 ; // Mystic: +50% Magic Science Effectivness
if ( Personality != 1 ) Sci_Mult_Channeling = 6*1   ; // Mystic: +50% Magic Science Effectivness

if ( Personality == 4 ) Sci_Mult_Crime = 6*1.75 ; // Rogue: +75% Thievery Science Effectivness
if ( Personality != 4 ) Sci_Mult_Crime = 6*1    ; // Rogue: +75% Thievery Science Effectivness







var Sci_Libraries = prefService.getIntPref( "extensions.Ultima.Building_Available_Libraries" );
var Sci_Libraries_Effects = Sci_Libraries * ( 2 - 0.02 * Sci_Libraries ) / 100 + 1 ;

var Thievery_Bonus_SCI = ( Sci_Race_Bonus * Sci_Personality_Bonus * Sci_Mult_Crime * Math.sqrt( Sci_Available_Crime / Land ) * Sci_Libraries_Effects ) / 100 + 1 ;

var Thievery_Bonus_Race = 1;

if ( Race == 9 ) Thievery_Bonus_Race = 1.5; // Halflings +50% TPA

TPAMod = Math.round( Thieves * Thievery_Bonus_SCI * Thievery_Bonus_Race * Honor_Bonus * Thievery_Bonus_TD / Land * 100 )/100 ;

/////////////
// TPA Mod //
/////////////













/////////////
// WPA Mod //
/////////////

Sci_Available_Channeling = prefService.getIntPref( "extensions.Ultima.ScienceCalculatorAvailableChanneling" );

var Magic_Bonus_SCI = ( Sci_Race_Bonus * Sci_Personality_Bonus * Sci_Mult_Channeling * Math.sqrt( Sci_Available_Channeling / Land ) * Sci_Libraries_Effects ) / 100 + 1 ;

var Magic_Bonus_Race = 1;

if ( Race == 1 ) Magic_Bonus_Race = 1.4; // Elves +40% WPA

WPAMod = Math.round( Wizards * Magic_Bonus_SCI * Magic_Bonus_Race * Honor_Bonus / Land * 100 )/100 ;

/////////////
// WPA Mod //
/////////////



























if ( Trade_Balance < (-4)*Networth ) Tax_Percentage = Math.round( (-4*Trade_Balance/Networth -16) * 100 )/100 ;

Tax_Percentage = " ("+Tax_Percentage+"% tax rate)";

var NW_Networth  = Math.round( Networth );
var NW_Land      = Math.round( Land*0.9*55+Land*0.1*15 );
var NW_Money     = Math.round( Money_Networth                      * Money           );
var NW_Peasants  = Math.round( Peasants_Networth                   * Peasants        );
var NW_Soldiers  = Math.round( Soldiers_Networth[Race]             * Soldiers        );
var NW_Off       = Math.round( Offensive_Specialist_Networth[Race] * Offensive_Units );
var NW_Def       = Math.round( Defensive_Specialist_Networth[Race] * Defensive_Units );
var NW_Elites    = Math.round( Elite_Unit_Networth[Race]           * Elite_Units     );
var NW_Horses    = Math.round( War_Horses_Networth                 * War_Horses      );
var NW_Thieves   = Math.round( Thieves_Networth                    * Thieves         );
var NW_Wizards   = Math.round( Wizards_Networth                    * Wizards         );
var NW_SCI       = Math.round( Networth - ( NW_Land+NW_Money+NW_Peasants+NW_Soldiers+NW_Off+NW_Def+NW_Elites+NW_Horses+NW_Thieves+NW_Wizards ) );

if ( NW_SCI < 0 ) NW_SCI = 0;

var NWP_Networth = Math.round( NW_Networth / Land     * 100 )/100;
var NWP_Land     = Math.round( NW_Land     / Networth * 100 );
var NWP_Money    = Math.round( NW_Money    / Networth * 100 );
var NWP_Peasants = Math.round( NW_Peasants / Networth * 100 );
var NWP_Soldiers = Math.round( NW_Soldiers / Networth * 100 );
var NWP_Off      = Math.round( NW_Off      / Networth * 100 );
var NWP_Def      = Math.round( NW_Def      / Networth * 100 );
var NWP_Elites   = Math.round( NW_Elites   / Networth * 100 );
var NWP_Horses   = Math.round( NW_Horses   / Networth * 100 );
var NWP_Thieves  = Math.round( NW_Thieves  / Networth * 100 );
var NWP_Wizards  = Math.round( NW_Wizards  / Networth * 100 );
var NWP_SCI      = Math.round( NW_SCI      / Networth * 100 );

Thieves         = Add_Commas( Thieves     );
Wizards         = Add_Commas( Wizards     );

NW_Networth     = Add_Commas( NW_Networth );
NW_Land         = Add_Commas( NW_Land     );
NW_Money        = Add_Commas( NW_Money    );
NW_Peasants     = Add_Commas( NW_Peasants );
NW_Soldiers     = Add_Commas( NW_Soldiers );
NW_Off          = Add_Commas( NW_Off      );
NW_Def          = Add_Commas( NW_Def      );
NW_Elites       = Add_Commas( NW_Elites   );
NW_Horses       = Add_Commas( NW_Horses   );
NW_Thieves      = Add_Commas( NW_Thieves  );
NW_Wizards      = Add_Commas( NW_Wizards  );
NW_SCI          = Add_Commas( NW_SCI      );

Networth_Name = ""+

"<br />"+c0+"** Networth Table: **"+cc+
"<br />"+c1+ "Total Networth: "                   +cc+c2+ NW_Networth +cc+c1+ "gc ("+       NWP_Networth +" per Acre)" +cc+
"<br />"+c1+ "Land (90% Built): "                 +cc+c2+ NW_Land     +cc+c1+ "gc ("+cc+c2+ NWP_Land     +"%"+cc+c1+") - [15+40gc]" +cc+
"<br />"+c1+ Elite_Unit_Name[Race]+": "           +cc+c2+ NW_Elites   +cc+c1+ "gc ("+cc+c2+ NWP_Elites   +"%"+cc+c1+") - ["+ Elite_Unit_Networth[Race] +"gc]" +cc+
"<br />"+c1+ "Thieves: "                          +cc+c2+ NW_Thieves  +cc+c1+ "gc ("+cc+c2+ NWP_Thieves  +"%"+cc+c1+") - [4gc]" +cc+
"<br />"+c1+ Offensive_Specialist_Name[Race]+": " +cc+c2+ NW_Off      +cc+c1+ "gc ("+cc+c2+ NWP_Off      +"%"+cc+c1+") - ["+ Offensive_Specialist_Networth[Race] +"gc]" +cc+
"<br />"+c1+ Defensive_Specialist_Name[Race]+": " +cc+c2+ NW_Def      +cc+c1+ "gc ("+cc+c2+ NWP_Def      +"%"+cc+c1+") - ["+ Defensive_Specialist_Networth[Race] +"gc]" +cc+
"<br />"+c1+ "Peasants: "                         +cc+c2+ NW_Peasants +cc+c1+ "gc ("+cc+c2+ NWP_Peasants +"%"+cc+c1+") - [1gc]" +cc+
"<br />"+c1+ "Wizards: "                          +cc+c2+ NW_Wizards  +cc+c1+ "gc ("+cc+c2+ NWP_Wizards  +"%"+cc+c1+") - [4gc]" +cc+
"<br />"+c1+ "War-Horses: "                       +cc+c2+ NW_Horses   +cc+c1+ "gc ("+cc+c2+ NWP_Horses   +"%"+cc+c1+") - [0.6gc]" +cc+
"<br />"+c1+ "Money: "                            +cc+c2+ NW_Money    +cc+c1+ "gc ("+cc+c2+ NWP_Money    +"%"+cc+c1+") - [1/1000gc]" +cc+
"<br />"+c1+ "Science (estimated): "              +cc+c2+ NW_SCI      +cc+c1+ "gc ("+cc+c2+ NWP_SCI      +"%"+cc+c1+") - [1/92gc]" +cc+
"<br />"+c1+ "Soldiers: "                         +cc+c2+ NW_Soldiers +cc+c1+ "gc ("+cc+c2+ NWP_Soldiers +"%"+cc+c1+") - ["+ Soldiers_Networth[Race] +"gc]" +cc+
"<br />";

Additional_Name += "<br />"+c1+"Thieves: "+cc+c2+Thieves+cc+c1+" ("+TPA+" per Acre / "+cc+c2+Stealth+"%"+cc+c1+" Stealth)" +cc;
Additional_Name += "<br />"+c1+"Wizards: "+cc+c2+Wizards+cc+c1+" ("+WPA+" per Acre / "+cc+c2+Mana   +"%"+cc+c1+" Mana)"    +cc+"<br />";

var Construction = Math.round( 2/31 * (Land + 11600));
var Raze         = Math.round( 350+ Land / 16 );

if ( Race == 2 ) Construction = 0;

var Bonus_12h = Peasants *  5 ;
var Bonus_20h = Peasants * 15 ;


if ( War     == 1 ) Additional_Name += "<br />"+c3+ War_Name            +cc+"<br />";
if ( Dragon  != 0 ) Additional_Name += "<br />"+c3+ Dragon_Name[Dragon] +cc+"<br />";
if ( Plague  == 1 ) Additional_Name += "<br />"+c3+ Plague_Name         +cc+"<br />";
if ( Hit     != 0 ) Additional_Name += "<br />"+c3+ Hit_Name[Hit]       +cc+"<br />";
if ( OverPop == 1 ) Additional_Name += "<br />"+c3+ OverPop_Name        +cc+"<br />";


if ( Crystal_Ball == 0 ) {

Thieves = Thieves.replace(/,/g, "");
Wizards = Wizards.replace(/,/g, "");


prefService.setCharPref('extensions.Ultima.YourThroneTPAMod' , TPAMod );
prefService.setCharPref('extensions.Ultima.YourThroneWPAMod' , WPAMod );

prefService.setCharPref('extensions.Ultima.YourThroneProvinceName'    , Province_Name          );
prefService.setIntPref('extensions.Ultima.YourThronekingdom'          , kingdom                );
prefService.setIntPref('extensions.Ultima.YourThroneisland'           , island                 );
prefService.setIntPref('extensions.Ultima.YourThroneUtopiaYear'       , Utopia_Year            );
prefService.setIntPref('extensions.Ultima.YourThroneUtopiaMonth'      , Utopia_Month           );
prefService.setIntPref('extensions.Ultima.YourThroneUtopiaDay'        , Utopia_Day             );
prefService.setIntPref('extensions.Ultima.YourThroneUtopiaMinute'     , Utopia_Minute          );
prefService.setIntPref('extensions.Ultima.YourThroneRace'             , Race                   );
prefService.setIntPref('extensions.Ultima.YourThroneGender'           , Gender                 );
prefService.setIntPref('extensions.Ultima.YourThroneRank'             , Rank                   );
prefService.setIntPref('extensions.Ultima.YourThronePersonality'      , Personality            );
prefService.setIntPref('extensions.Ultima.YourThroneLand'             , Land                   );
prefService.setIntPref('extensions.Ultima.YourThronePeasants'         , Peasants               );
prefService.setIntPref('extensions.Ultima.YourThroneBE'               , Building_Effectiveness );
prefService.setIntPref('extensions.Ultima.YourThroneOffensivePoints'  , Offensive_Points       );
prefService.setIntPref('extensions.Ultima.YourThroneDefensivePoints'  , Defensive_Points       );
prefService.setIntPref('extensions.Ultima.YourThroneMoney'            , Money                  );
prefService.setIntPref('extensions.Ultima.YourThroneFood'             , Food                   );
prefService.setIntPref('extensions.Ultima.YourThroneRunes'            , Runes                  );
prefService.setIntPref('extensions.Ultima.YourThroneSoldiers'         , Soldiers               );
prefService.setIntPref('extensions.Ultima.YourThroneOffensiveUnits'   , Offensive_Units        );
prefService.setIntPref('extensions.Ultima.YourThroneDefensiveUnits'   , Defensive_Units        );
prefService.setIntPref('extensions.Ultima.YourThroneEliteUnits'       , Elite_Units            );
prefService.setIntPref('extensions.Ultima.YourThroneThieves'          , Thieves                );
prefService.setIntPref('extensions.Ultima.YourThroneStealth'          , Stealth                );
prefService.setIntPref('extensions.Ultima.YourThroneWizards'          , Wizards                );
prefService.setIntPref('extensions.Ultima.YourThroneMana'             , Mana                   );
prefService.setIntPref('extensions.Ultima.YourThroneTradeBalance'     , Trade_Balance          );
prefService.setIntPref('extensions.Ultima.YourThroneWarHorses'        , War_Horses             );
prefService.setIntPref('extensions.Ultima.YourThronePrisoners'        , Prisoners              );
prefService.setIntPref('extensions.Ultima.YourThroneNetworth'         , Networth               );
prefService.setIntPref('extensions.Ultima.YourThroneDragon'           , Dragon                 );
prefService.setIntPref('extensions.Ultima.YourThroneHit'              , Hit                    );
prefService.setIntPref('extensions.Ultima.YourThronePlague'           , Plague                 );
prefService.setIntPref('extensions.Ultima.YourThroneWar'              , War                    );
prefService.setIntPref('extensions.Ultima.YourThroneOverPop'          , OverPop                );

prefService.setCharPref('extensions.Ultima.MilitaryCalculatorYourProvinceName' , Province_Name+" ("+kingdom+":"+island+")" );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRace'          , Race         );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourPersonality'   , Personality  );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRelations'     , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourStance'        , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourDragon'        , Dragon );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourSoldiers'      , Soldiers );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourOffSpecs'      , Offensive_Units );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourDefSpecs'      , Defensive_Units );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourElites'        , Elite_Units );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourLand'          , Land );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourNW'            , Networth );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourKDNW'          , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourOME'           , MEO * 1000000 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourDME'           , MED * 1000000 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourGenerals'      , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourAttackTime'    , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourHorses'        , War_Horses );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourMerc'          , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourPris'          , Prisoners );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourMilitarySci'   , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRecentlyHit'   , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourGuardStation'  , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourPeasants'      , Peasants );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRawME'         , 100 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourBE'            , Building_Effectiveness );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourTG'            , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourForts'         , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRank'          , Rank );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourFanaticismBox' , false );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourAggressionBox' , false );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourProtectionBox' , true  );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourPlagueBox'     , false );

if ( War    == 1 ) prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRelations'     , 3 );
if ( Rank   == 9 ) prefService.setIntPref('extensions.Ultima.MilitaryCalculatorYourRank'          , 2 );
if ( Rank   != 9 ) prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourMonarchBox' , false );
if ( Rank   == 9 ) prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourMonarchBox' , true  );
if ( Plague == 1 ) prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorYourPlagueBox'  , true  );

prefService.setCharPref('extensions.Ultima.Thievery_YourThief'       , Province_Name+" ("+kingdom+":"+island+")" );
prefService.setIntPref( 'extensions.Ultima.Thievery_YourRace'        , Race         );
prefService.setIntPref( 'extensions.Ultima.Thievery_YourPersonality' , Personality  );
prefService.setIntPref( 'extensions.Ultima.Thievery_YourThieves'     , Thieves      );
prefService.setIntPref( 'extensions.Ultima.Thievery_YourNetworth'    , Networth     );

} else {

prefService.setCharPref('extensions.Ultima.EnemyThroneProvinceName'    , Province_Name          );
prefService.setIntPref('extensions.Ultima.EnemyThronekingdom'          , kingdom                );
prefService.setIntPref('extensions.Ultima.EnemyThroneisland'           , island                 );
prefService.setIntPref('extensions.Ultima.EnemyThroneUtopiaYear'       , Utopia_Year            );
prefService.setIntPref('extensions.Ultima.EnemyThroneUtopiaMonth'      , Utopia_Month           );
prefService.setIntPref('extensions.Ultima.EnemyThroneUtopiaDay'        , Utopia_Day             );
prefService.setIntPref('extensions.Ultima.EnemyThroneUtopiaMinute'     , Utopia_Minute          );
prefService.setIntPref('extensions.Ultima.EnemyThroneRace'             , Race                   );
prefService.setIntPref('extensions.Ultima.EnemyThroneGender'           , Gender                 );
prefService.setIntPref('extensions.Ultima.EnemyThroneRank'             , Rank                   );
prefService.setIntPref('extensions.Ultima.EnemyThronePersonality'      , Personality            );
prefService.setIntPref('extensions.Ultima.EnemyThroneLand'             , Land                   );
prefService.setIntPref('extensions.Ultima.EnemyThronePeasants'         , Peasants               );
prefService.setIntPref('extensions.Ultima.EnemyThroneBE'               , Building_Effectiveness );
prefService.setIntPref('extensions.Ultima.EnemyThroneOffensivePoints'  , Offensive_Points       );
prefService.setIntPref('extensions.Ultima.EnemyThroneDefensivePoints'  , Defensive_Points       );
prefService.setIntPref('extensions.Ultima.EnemyThroneMoney'            , Money                  );
prefService.setIntPref('extensions.Ultima.EnemyThroneFood'             , Food                   );
prefService.setIntPref('extensions.Ultima.EnemyThroneRunes'            , Runes                  );
prefService.setIntPref('extensions.Ultima.EnemyThroneSoldiers'         , Soldiers               );
prefService.setIntPref('extensions.Ultima.EnemyThroneOffensiveUnits'   , Offensive_Units        );
prefService.setIntPref('extensions.Ultima.EnemyThroneDefensiveUnits'   , Defensive_Units        );
prefService.setIntPref('extensions.Ultima.EnemyThroneEliteUnits'       , Elite_Units            );
prefService.setIntPref('extensions.Ultima.EnemyThroneThieves'          , Thieves                );
prefService.setIntPref('extensions.Ultima.EnemyThroneStealth'          , Stealth                );
prefService.setIntPref('extensions.Ultima.EnemyThroneWizards'          , Wizards                );
prefService.setIntPref('extensions.Ultima.EnemyThroneMana'             , Mana                   );
prefService.setIntPref('extensions.Ultima.EnemyThroneTradeBalance'     , Trade_Balance          );
prefService.setIntPref('extensions.Ultima.EnemyThroneWarHorses'        , War_Horses             );
prefService.setIntPref('extensions.Ultima.EnemyThronePrisoners'        , Prisoners              );
prefService.setIntPref('extensions.Ultima.EnemyThroneNetworth'         , Networth               );
prefService.setIntPref('extensions.Ultima.EnemyThroneDragon'           , Dragon                 );
prefService.setIntPref('extensions.Ultima.EnemyThroneHit'              , Hit                    );
prefService.setIntPref('extensions.Ultima.EnemyThronePlague'           , Plague                 );
prefService.setIntPref('extensions.Ultima.EnemyThroneWar'              , War                    );
prefService.setIntPref('extensions.Ultima.EnemyThroneOverPop'          , OverPop                );

prefService.setCharPref('extensions.Ultima.MilitaryCalculatorEnemyProvinceName' , Province_Name+" ("+kingdom+":"+island+")" );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRace'          , Race         );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyPersonality'   , Personality  );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRelations'     , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyStance'        , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyDragon'        , Dragon );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemySoldiers'      , Soldiers );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyOffSpecs'      , Offensive_Units );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyDefSpecs'      , Defensive_Units );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyElites'        , Elite_Units );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyLand'          , Land );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyNW'            , Networth );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyKDNW'          , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyOME'           , MEO * 1000000 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyDME'           , MED * 1000000 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyGenerals'      , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyAttackTime'    , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyHorses'        , War_Horses );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyMerc'          , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyPris'          , Prisoners );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyMilitarySci'   , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRecentlyHit'   , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyGuardStation'  , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyPeasants'      , Peasants );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRawME'         , 100 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyBE'            , Building_Effectiveness );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyTG'            , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyForts'         , 0 );
prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRank'          , Rank );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyFanaticismBox' , false );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyAggressionBox' , false );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyProtectionBox' , true  );
prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyPlagueBox'     , false );

if ( War    == 1 ) prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRelations'     , 3 );
if ( Rank   == 9 ) prefService.setIntPref('extensions.Ultima.MilitaryCalculatorEnemyRank'          , 2 );
if ( Rank   != 9 ) prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyMonarchBox' , false );
if ( Rank   == 9 ) prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyMonarchBox' , true  );
if ( Plague == 1 ) prefService.setBoolPref('extensions.Ultima.MilitaryCalculatorEnemyPlagueBox'  , true  );

prefService.setIntPref( 'extensions.Ultima.Thievery_EnemyNetworth'   , Networth );
prefService.setCharPref('extensions.Ultima.Thievery_EnemyThief'      , Province_Name+" ("+kingdom+":"+island+")" );
if ( War    == 1 ) prefService.setIntPref( 'extensions.Ultima.Thievery_EnemyRelations'  , 3 );

prefService.setIntPref( 'extensions.Ultima.Thievery_Money'           , Money                  );
prefService.setIntPref( 'extensions.Ultima.Thievery_Food'            , Food                   );
prefService.setIntPref( 'extensions.Ultima.Thievery_Runes'           , Runes                  );
prefService.setIntPref( 'extensions.Ultima.Thievery_Peasants'        , Peasants               );
prefService.setIntPref( 'extensions.Ultima.Thievery_Wizards'         , Wizards                );
prefService.setIntPref( 'extensions.Ultima.Thievery_Soldiers'        , Soldiers               );
prefService.setIntPref( 'extensions.Ultima.Thievery_OffSpecs'        , Offensive_Units        );
prefService.setIntPref( 'extensions.Ultima.Thievery_DefSpecs'        , Defensive_Units        );
prefService.setIntPref( 'extensions.Ultima.Thievery_Elites'          , Elite_Units            );
prefService.setIntPref( 'extensions.Ultima.Thievery_Horses'          , War_Horses             );
prefService.setIntPref( 'extensions.Ultima.Thievery_Prisoners'       , Prisoners              );

}


MEO = Math.round( MEO * 100 ) / 100;
MED = Math.round( MED * 100 ) / 100;

Land             = Add_Commas( Land             );
Money            = Add_Commas( Money            );
Daily_Income     = Add_Commas( Daily_Income     );
Food             = Add_Commas( Food             );
Runes            = Add_Commas( Runes            );
Population       = Add_Commas( Population       );
Peasants         = Add_Commas( Peasants         );
Trade_Balance    = Add_Commas( Trade_Balance    );
Soldiers         = Add_Commas( Soldiers         );
Offensive_Units  = Add_Commas( Offensive_Units  );
Defensive_Units  = Add_Commas( Defensive_Units  );
Elite_Units      = Add_Commas( Elite_Units      );
War_Horses       = Add_Commas( War_Horses       );
Prisoners        = Add_Commas( Prisoners        );
Networth         = Add_Commas( Networth         );
offm             = Add_Commas( offm             );
defm             = Add_Commas( defm             );
oelm             = Add_Commas( oelm             );
delm             = Add_Commas( delm             );
horm             = Add_Commas( horm             );
prim             = Add_Commas( prim             );
Offensive_Points = Add_Commas( Offensive_Points );
Defensive_Points = Add_Commas( Defensive_Points );
el75             = Add_Commas( el75             );
el25             = Add_Commas( el25             );
Construction     = Add_Commas( Construction     );
Raze             = Add_Commas( Raze             );
Bonus_12h        = Add_Commas( Bonus_12h        );
Bonus_20h        = Add_Commas( Bonus_20h        );



textonly = c0+"The Province of "+Province_Name+" ("+kingdom+":"+island+")"+cc+Copyrights+
cx+c1+ "Utopian Date: "                     +cc+c2;

textonly += Utopian_Date;

textonly += cc+c1+" ("+cc+c2+Math.round(Utopia_Minute*100/60)+"%"+cc+c1+" in the day)"+cc+
cx+c1+ "RL Date: "                        +cc+c2+ Real_Date        +cc+
cx+
cx+c1+ "Ruler Name: "                       +cc+c2+ Ruler_Name       +cc+
cx+c1+ "Personality & Race: "               +cc+c2+ "The "+Personality_Name[Personality]+cc+c1+", "+cc+c2+Race_Name[Race]+cc+
cx+c1+ "Land: "                             +cc+c2+ Land             +cc+c1+" Acres"+cc+
cx+c1+ "Money: "                            +cc+c2+ Money            +cc+c1+"gc ("+Daily_Income+"gc daily income)"+cc+
cx+c1+ "Food: "                             +cc+c2+ Food             +cc+c1+" bushels"+cc+
cx+c1+ "Runes: "                            +cc+c2+ Runes            +cc+c1+" runes"+cc+
cx+c1+ "Population: "                       +cc+c2+ Population       +cc+c1+" citizens ("+PPA+" per Acre)"+cc+
cx+c1+ "Peasants: "                         +cc+c2+ Peasants         +cc+c1+" ("+cc+c2+Building_Effectiveness+"%"+cc+c1+" Building Efficiency)"+cc+
cx+c1+ "Trade Balance: "                    +cc+c2+ Trade_Balance    +cc+c1+"gc"+Tax_Percentage+cc+

cx+
cx+c1+ MEStanceSTR                          +cc+c2+ MEO+"%"          +cc+c1+ " off. / " +cc+c2+MED+"%"+cc+c1+" def."+cc+
cx+c1+ "Soldiers: "                         +cc+c2+ Soldiers         +cc+c1+ " ("+ Draft_Rate  +"% estimated draft rate)"+cc+
cx+c1+ Offensive_Specialist_Name[Race]+": " +cc+c2+ Offensive_Units  +cc+c1+ " ("+ offm +" offense)"  +cc+
cx+c1+ Defensive_Specialist_Name[Race]+": " +cc+c2+ Defensive_Units  +cc+c1+ " ("+ defm +" defense)"  +cc+
cx+c1+ Elite_Unit_Name[Race]+": "           +cc+c2+ Elite_Units      +cc+c1+ " ("+ oelm +" offense / "+delm+" defense)"+cc+
cx+c1+ "War-Horses: "                       +cc+c2+ War_Horses       +cc+c1+ " (up to "+horm+" additional offense)"+cc+
cx+c1+ "Prisoners: "                        +cc+c2+ Prisoners        +cc+c1+ " ("+ prim +" offense)"  +cc+
cx+
cx+c1+ "Total Modified Offense: "           +cc+c2+ Offensive_Points +cc+c1+ " ("+ OPA  +" per Acre)" +cc+
cx+c1+ "Practical (100% elites): "           +cc+c2+ el75             +cc+c1+ " ("+ pa75 +" per Acre)" +cc+
cx+c1+ "Total Modified Defense: "           +cc+c2+ Defensive_Points +cc+c1+ " ("+ DPA  +" per Acre)" +cc+
cx+c1+ "Practical (0% elites): "           +cc+c2+ el25             +cc+c1+ " ("+ pa25 +" per Acre)" +cc+
cx+

Additional_Name+

Networth_Name+

cx+c1+ "Buildings: "                        +cc+c2+ Construction     +cc+c1+ "gc to build, " +cc+c2+ Raze      +cc+c1+ "gc to raze" +cc+
//cx+c1+ "Away bonus: "                       +cc+c2+ Bonus_12h        +cc+c1+ "gc (12h) / "   +cc+c2+ Bonus_20h +cc+c1+ "gc (20h)"   +cc+
cx;

formated_text = textonly;

textonly = textonly.replace(/<font color='#aa8822'>/g, "");
textonly = textonly.replace(/<font>/g, "");
textonly = textonly.replace(/<font color='#888888'>/g, "");
textonly = textonly.replace(/<font color='#ff0000'>/g, "");
textonly = textonly.replace(/<\/font>/g, "");
textonly = textonly.replace(/<br \/>/g, String.fromCharCode(13,10));

formated_copy = textonly;




formated_copy += String.fromCharCode(13,10) + "** Export Line [ver 1] -- Throne [ver 1]: **" + String.fromCharCode(13,10) + Export_Line_Encryption(Export_Line);

}